From 3094f8633466c8b1cf7646b832c5cd497fc71afa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonas=20Dre=C3=9Fler?= Date: Tue, 12 Feb 2019 13:04:55 +0100 Subject: [PATCH] workspace: Reset idle hide timeout for overlays on reentry Instead of returning and waiting until the old timeout is finished, start a new idle hide timeout for the overlay when the pointer enters a window clone. This makes sure the timeout for hiding the overlay after the pointer left the clone mostly stays the same (except when leaving the clone via the title or the close button). https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683 --- js/ui/workspace.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 4d1f65115..b80aa6c9e 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -686,10 +686,11 @@ var WindowOverlay = class { } _onHideChrome() { - if (this._idleHideOverlayId == 0) { - this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this)); - GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay'); - } + if (this._idleHideOverlayId == 0) + GLib.source_remove(this._idleHideOverlayId); + + this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this)); + GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay'); } _idleHideOverlay() { -- 2.39.5